home *** CD-ROM | disk | FTP | other *** search
- ELF(4) Last changed: 10-21-98
-
-
- NNAAMMEE
- eellff - Executable and Linking Format (ELF) files
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<eellff..hh>>
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- The aa..oouutt file name is the default ELF-format output file name from
- the lldd(1) link editor. The link editor will make an aa..oouutt executable
- if there were no errors and no unresolved external references.
-
- Programs that manipulate ELF files may use the library described in
- the eellff(3E) man page. An overview of the file format follows. For
- more complete information, see the references in the SEE ALSO section.
-
- LLiinnkkiinngg VViieeww EExxeeccuuttiioonn VViieeww
-
- ELF header ELF header
-
- Program header table (optional) Program header table
-
- Section 1 Segment 1
-
- ... ...
-
- Section _n Segment _n
-
- Section header table Section header table (optional)
-
- An ELF header resides at the beginning and holds a ``road map'' that
- describes the file's organization. Sections hold the bulk of object
- file information for the linking view: instructions, data, symbol
- table, relocation information, and so on. Segments hold the object
- file information for the program execution view. A segment may
- contain one or more sections.
-
- A program header table, if present, tells the system how to create a
- process image. Files used to build a process image (execute a
- program) must have a program header table; relocatable files do not
- need one. A section header table contains information describing the
- file's sections. Every section has an entry in the table; each entry
- provides information such as the section name, the section size, etc.
- Files used during linking must have a section header table; other
- object files may or may not have one. SGI executables and DSO files
- will be created with section header tables, so their absence in an
- object file, while not prohibited, may disable various tools.
-
- Although the overview of the file format indicates that the program
- header table immediately follows the ELF header, and the section
- header table follows the sections, actual files may differ. Sections
- and segments have no specified order. Only the ELF header has a fixed
- position in the file.
-
- When an aa..oouutt file is loaded into memory for execution, three kinds of
- logical segments are set up: the text segment, the data segment
- (initialized data followed by uninitialized, the latter actually being
- initialized to all 0s), and a stack. A program can have multiple text
- and data segments but only one stack segment. The text segments are
- not writable by the program; if other processes are executing the same
- aa..oouutt file, the processes will share the same text segments.
-
- The first data segment generally starts at the next maximal page
- boundary past the last text address. If the system supports more than
- one page size, the ``maximal page'' is the largest supported size.
- When the process image is created, the part of the file holding the
- end of text and the beginning of data may appear twice. The
- duplicated chunk of text that appears at the beginning of data is
- never executed; it is duplicated so that the operating system may
- bring in pieces of the file in multiples of the actual page size
- without having to realign the beginning of the data section to a page
- boundary. Therefore, the first data address is the sum of the next
- maximal page boundary past the end of text plus the remainder of the
- last text address divided by the maximal page size. If the last text
- address is a multiple of the maximal page size, no duplication is
- necessary. The stack is extended automatically as required. The last
- data segment is extended as requested by the bbrrkk(2) system call.
-
- NNOOTTEESS
- ELF is the executable and object file format used on IRIX 5 and later
- systems.
-
- SSEEEE AALLSSOO
- aass(1), cccc(1), lldd(1)
-
- bbrrkk(2)
-
- aa..oouutt(4)
-
- _I_R_I_X _S_y_s_t_e_m _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
-
- This man page is available only online.
-